Files
It is possible to send files (images, config files, ...) to the Capture Edge, over any protocol that supports strings.
The message can either contain the base64 encoded contents of the file, or a file path.
The syntax to use when encoding the file in base64
data:{mimetype};[ext={extension}];[dstpath={destinationPath}];[sync={sync}];base64,{base64EncodedFile}
| Field | Required | Description |
|---|---|---|
| mimetype | Yes | Mimetype of the file. Example: plain/text |
| extension | No, but recommended | Extension of the file. If it isn't provided, the first known extension for the provided mimetype is used. |
| dstpath | No | The relative path where to store the file (both locally and in the cloud) . If not provided, a random path will be generated. |
| sync | No | If set to 'yes', the file will be synced to the cloud. Default: no. |
| base64EncodedFile | Yes | The Base64 encoded file. |
Examples:
data:image/jpeg;ext=jpg;base64,ABCDEF0123456789
data:plain/text;ext=txt;sync=true;dstpath=configFiles/myapp/config1.txt;base64,ABCDEF0123456789
The syntax to use when using file path
data:{mimetype};isFilePath={isFilePath};[ext={extension}];[dstpath={destinationPath}];[sync={sync}];[createlocalcopy={createLocalCopy}],{filePath}
| Field | Required | Description |
|---|---|---|
| mimetype | Yes | Mimetype of the file. Example: plain/text |
| isFilePath | Yes | This indicates the content is a path |
| dstpath | No | The relative path where to store the file (both locally and in the cloud) . If not provided, a random path will be generated. |
| sync | No | If set to 'yes', the file will be synced to the cloud. Default: no. |
| createlocalcopy | No | Overrides the global Copy Files To Local On Ingest setting for this file only. When true, the file is copied to the Capture data folder and synced from there; when false, the original file path is used for syncing. Default: the global setting. |
| filePath | Yes | The path to the file, accessible for the collector service. |
Examples:
data:image/jpeg;ext=jpg;isFilePath=true,/mnt/drive1/file1.jpg
data:plain/text;ext=conf;sync=true;dstpath=configFiles/myapp/config1.txt;isFilePath=true,C:\myapp\config\config.conf
data:image/jpeg;isFilePath=true;createlocalcopy=false,/mnt/drive1/file1.jpg
createlocalcopy controls whether the collector copies the file into the Capture data folder before syncing, or syncs directly from the original path. Set per-file here, it overrides the global Copy Files To Local On Ingest setting. See Copy Files To Local On Ingest for the global setting and how it interacts with deleting local files after syncing.
Blob store configuration
The company of the device/gateway needs a blob store configured to store these files in the cloud. In the Capture portal, tab 'identity & access mgmt', select the company. Then open the 'Blob stores' tab and click 'Add blob store' in the top right corner.